let uposter = {
	qrCode: {
		width: '200px',
		height: '200px',
		background: '#FFFFFF',
		views: [{
			type: 'qrcode',
			text: '',
			css: {
				width: '200px',
				height: '200px'
			},
		}]
	},
	initQrCode: function(data) {
		this.qrCode.views[0].text = data
		return this.qrCode
	},
	// 分销商海报
	fxs: {
		width: '750rpx',
		height: '1114rpx',
		background: '#ff6a6c',
		radius: '12rpx',
		views: [{
				type: 'view',
				css: {
					left: '40rpx',
					top: '40rpx',
					background: '#fff',
					radius: '30rpx',
					width: '670rpx',
					height: '740rpx',
					shadow: '0 20rpx 48rpx rgba(0,0,0,.05)'
				}
			},
			// 1. 会员头像
			{
				type: 'image',
				src: 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLj1JIHX0icWAu4Jw920k6ZIAqNd9ZfHLalqWsweMLphLrcwRJCYr0hcyeY6Y5Kyaqibl6icTAykDWRA/132',
				mode: 'widthFix',
				css: {
					left: '210rpx',
					top: '140rpx',
					width: '120rpx',
					height: '120rpx',
					radius: '50%',
					color: '#999',
					shadow: '0px 0px 7px #f0f0f0'
				}
			},
			// 2. 会员名称
			{
				type: 'text',
				text: 'Usecloud',
				css: {
					color: '#000',
					left: '350rpx',
					top: '148rpx',
					fontSize: '34rpx',
					fontWeight: 'bold'
				}
			},
			// 3. 分销商
			{
				type: 'text',
				text: '分销商',
				css: {
					color: '#fff',
					left: '350rpx',
					top: '202rpx',
					fontSize: '24rpx',
					background: '#ff6a6c',
					radius: '12rpx',
					padding: '6rpx 16rpx'
				}
			},
			// 4. 分销商二维码
			{
				type: 'image',
				src: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-7e00db99-ad65-4b9f-a74b-61bccb92b124/11bd19fa-6a70-49fd-9e71-72950828f6a8.jpg',
				mode: 'widthFix',
				css: {
					left: '200rpx',
					top: '310rpx',
					width: '350rpx',
					height: '350rpx'
				}
			},
			// 5. 扫一扫加入
			{
				type: 'text',
				text: '扫一扫加入',
				css: {
					width: '100%',
					textAlign: 'center',
					color: '#000',
					top: '690rpx'
				}
			},
			// 6. LOGO
			{
				type: 'image',
				src: 'https://mp-35bbc758-ef49-46ab-ba53-b5ee095410fb.cdn.bspapp.com/account/images/1.jpg',
				mode: 'widthFix',
				css: {
					left: '295rpx',
					top: '830rpx',
					width: '160rpx',
					height: '160rpx',
					radius: '50%'
				}
			},
			// 7. slogan
			{
				type: 'text',
				text: '团年年',
				css: {
					color: '#fff',
					width: '100%',
					textAlign: 'center',
					top: '1000rpx',
					fontSize: '40rpx',
					fontWeight: 'bold'
				}
			}
		]
	},
	getFxsData: function (avatar, name, qrcode, desc) {
		// 会员头像
		this.fxs.views[1].src = avatar;
		// 会员名称
		this.fxs.views[2].text = name;
		
		// 二维码
		this.fxs.views[4].src = qrcode;
		
		// slogan
		this.fxs.views[7].text = desc;
		return this.fxs;
	}
};

export default uposter;